<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.11.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>cppMISC: include/timer.hpp 源文件</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript" src="../../darkmode_toggle.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">cppMISC<span id="projectnumber">&#160;v1.1</span>
   </div>
   <div id="projectbrief">cppMisc 文档系统</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.11.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('../../',true,false,'search.php','搜索',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="headertitle"><div class="title">timer.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../df/d05/timer_8hpp.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span> </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="preprocessor">#if defined __TIMER_OLD__</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="preprocessor">#    include &quot;<a class="code" href="../../d0/de3/timer__old_8hpp.html">timer_old.hpp</a>&quot;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="preprocessor">#include &lt;functional&gt;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="preprocessor">#include &lt;memory&gt;</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span><span class="preprocessor">#include &lt;map&gt;</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="preprocessor">#include &lt;list&gt;</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="preprocessor">#include &lt;thread&gt;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="preprocessor">#include &lt;mutex&gt;</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span> </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="preprocessor">#include &quot;<a class="code" href="../../db/d24/itimer_8hpp.html">details/itimer.hpp</a>&quot;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="preprocessor">#include &quot;<a class="code" href="../../de/d6d/singleton_8hpp.html">designM/singleton.hpp</a>&quot;</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span> </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../df/d8d/namespacewheels.html">wheels</a></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span>{</div>
<div class="foldopen" id="foldopen00026" data-start="{" data-end="};">
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"><a class="line" href="../../db/d3e/classwheels_1_1_c_timer.html">   26</a></span><span class="keyword">class </span><a class="code hl_class" href="../../db/d3e/classwheels_1_1_c_timer.html">CTimer</a> : <span class="keyword">public</span> <a class="code hl_struct" href="../../d2/d38/structi_timer.html">iTimer</a></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span>{</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span>    std::shared_ptr&lt; iTimer &gt;   pt_imp__;</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span>    <a class="code hl_function" href="../../db/d3e/classwheels_1_1_c_timer.html#a93e4d770fd09f5e1b984768620cc52bf">CTimer</a>();</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span>    <a class="code hl_function" href="../../db/d3e/classwheels_1_1_c_timer.html#a93e4d770fd09f5e1b984768620cc52bf">CTimer</a>( <span class="keywordtype">long</span> ms , <span class="keywordtype">bool</span> oneShot = <span class="keyword">false</span> );</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span>    <a class="code hl_function" href="../../db/d3e/classwheels_1_1_c_timer.html#a93e4d770fd09f5e1b984768620cc52bf">CTimer</a>( std::function&lt; <span class="keywordtype">void</span> () &gt; fun , <span class="keywordtype">long</span> ms , <span class="keywordtype">bool</span> oneShot = <span class="keyword">false</span> );</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="../../db/d3e/classwheels_1_1_c_timer.html#ac4981c5eaeeacca8b3a123d4069c8812">   38</a></span>    <a class="code hl_function" href="../../db/d3e/classwheels_1_1_c_timer.html#ac4981c5eaeeacca8b3a123d4069c8812">CTimer</a>( <span class="keyword">const</span> <a class="code hl_class" href="../../db/d3e/classwheels_1_1_c_timer.html">CTimer</a>&amp; b ){ pt_imp__ = b.pt_imp__; }</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span>    <a class="code hl_function" href="../../db/d3e/classwheels_1_1_c_timer.html#afd3f6595928cd20f7faaece75f017733">~CTimer</a>();</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span> </div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span>    <span class="keyword">virtual</span> <a class="code hl_enumeration" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5ab">emErrCode</a> <a class="code hl_function" href="../../db/d3e/classwheels_1_1_c_timer.html#a5a4c68739dffae58b731c5e9fcb98b0b">Start</a>( <span class="keywordtype">long</span> ms = -1, <span class="keywordtype">bool</span> oneShot = <span class="keyword">false</span>) final;</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span>    virtual <span class="keywordtype">void</span> <a class="code hl_function" href="../../db/d3e/classwheels_1_1_c_timer.html#a503a7fd2e5fdfcd321622f6c34f234e3">SetOwner</a>( <a class="code hl_namespace" href="../../d8/dcc/namespacestd.html">std</a>::function&lt;<span class="keywordtype">void</span>(  )&gt; fun ) final;</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span>    virtual <a class="code hl_enumeration" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5ab">emErrCode</a> <a class="code hl_function" href="../../db/d3e/classwheels_1_1_c_timer.html#a128e8bdb25823a748453e1b2a817ec99">Stop</a>(  ) final;</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span>    virtual <span class="keywordtype">bool</span> <a class="code hl_function" href="../../db/d3e/classwheels_1_1_c_timer.html#ad766f6d3012844697d709021ab23bb1b">IsRuning</a>(  ) final;</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span> </div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span>    virtual <a class="code hl_enumeration" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5ab">emErrCode</a> <a class="code hl_function" href="../../db/d3e/classwheels_1_1_c_timer.html#a981c7a2959ddebff80bd6f8eb2312a4f">Reset</a>() final;</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="../../db/d3e/classwheels_1_1_c_timer.html#a0e94a7484f06a6e38c29591182191510">   64</a></span>    <span class="keywordtype">void</span> <a class="code hl_function" href="../../db/d3e/classwheels_1_1_c_timer.html#a0e94a7484f06a6e38c29591182191510">setTick</a>( <span class="keywordtype">long</span> tick ){ <span class="keywordflow">if</span>( pt_imp__ ) { pt_imp__-&gt;setTick(tick);} }</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span>};</div>
</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span> </div>
<div class="foldopen" id="foldopen00067" data-start="{" data-end="};">
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"><a class="line" href="../../d4/ded/classwheels_1_1ordered_timer.html">   67</a></span><span class="keyword">class </span><a class="code hl_class" href="../../d4/ded/classwheels_1_1ordered_timer.html">orderedTimer</a> : <span class="keyword">public</span> std::enable_shared_from_this&lt; orderedTimer &gt;</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span>{</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span><span class="keyword">public</span>:</div>
<div class="foldopen" id="foldopen00073" data-start="{" data-end="};">
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"><a class="line" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html">   73</a></span>    <span class="keyword">struct </span><a class="code hl_struct" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html">stTimerItem</a> : <span class="keyword">public</span> std::enable_shared_from_this&lt; stTimerItem &gt;</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span>    {</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"><a class="line" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#aefcd9a0a370ca95c37da2bfa2414aa0a">   75</a></span>        uint32_t     <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#aefcd9a0a370ca95c37da2bfa2414aa0a">m_id</a>;</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"><a class="line" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a8f3bc796ececffd2605ada203e8c3d6a">   76</a></span>        uint64_t     <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a8f3bc796ececffd2605ada203e8c3d6a">m_abs_tick</a>;                    <span class="comment">// 计数数量，绝对计数数量</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"><a class="line" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a7e554f63565f3255151a689c8a715d7d">   77</a></span>        uint64_t     <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a7e554f63565f3255151a689c8a715d7d">m_rel_tick</a>;                    <span class="comment">// 相对计数数量</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"><a class="line" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#af3b6859b5f9a352e157cddee2f42bef9">   78</a></span>        <span class="keywordtype">bool</span>         <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#af3b6859b5f9a352e157cddee2f42bef9">m_one_shot</a>;</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span>        </div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"><a class="line" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a81e459956b6374fa2679bb7e19f063e5">   80</a></span>        <span class="keyword">mutable</span> std::shared_ptr&lt; orderedTimer &gt;  <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a81e459956b6374fa2679bb7e19f063e5">pt_mgr__</a>;     <span class="comment">// 管理器对象</span></div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"><a class="line" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#aacd449d1db7359736073e5c39f29c7f8">   81</a></span>        std::function&lt; void () &gt;   <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#aacd449d1db7359736073e5c39f29c7f8">m_cb</a>;            <span class="comment">// 消息通知</span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span> </div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span>        <a class="code hl_friend" href="../../d4/ded/classwheels_1_1ordered_timer.html#aadbb5b64702bfb31959d3dae954206d1">stTimerItem</a>( uint64_t t , uint32_t <span class="keywordtype">id</span> , <span class="keywordtype">bool</span> one_shot = <span class="keyword">false</span> );</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span>        <a class="code hl_friend" href="../../d4/ded/classwheels_1_1ordered_timer.html#aadbb5b64702bfb31959d3dae954206d1">stTimerItem</a>( uint64_t t , uint32_t <span class="keywordtype">id</span> , std::shared_ptr&lt;orderedTimer&gt; mgr, <span class="keywordtype">bool</span> one_shot = <span class="keyword">false</span> );</div>
<div class="foldopen" id="foldopen00085" data-start="{" data-end="}">
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"><a class="line" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a599c4f1b59861d7645b208c5da3cbbd5">   85</a></span>            <a class="code hl_function" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a599c4f1b59861d7645b208c5da3cbbd5">stTimerItem</a>( <span class="keyword">const</span> <a class="code hl_struct" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html">stTimerItem</a>&amp; b ):</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span>          <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#aefcd9a0a370ca95c37da2bfa2414aa0a">m_id</a>( b.<a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#aefcd9a0a370ca95c37da2bfa2414aa0a">m_id</a>),</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span>          <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a8f3bc796ececffd2605ada203e8c3d6a">m_abs_tick</a>( b.<a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a8f3bc796ececffd2605ada203e8c3d6a">m_abs_tick</a> ),</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span>          <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a7e554f63565f3255151a689c8a715d7d">m_rel_tick</a>( b.<a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a7e554f63565f3255151a689c8a715d7d">m_rel_tick</a> ),</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span>          <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#af3b6859b5f9a352e157cddee2f42bef9">m_one_shot</a>( b.<a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#af3b6859b5f9a352e157cddee2f42bef9">m_one_shot</a> ),</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span>          <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a81e459956b6374fa2679bb7e19f063e5">pt_mgr__</a>( b.<a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a81e459956b6374fa2679bb7e19f063e5">pt_mgr__</a> )</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span>            {</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span>            <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#aacd449d1db7359736073e5c39f29c7f8">m_cb</a> = b.<a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#aacd449d1db7359736073e5c39f29c7f8">m_cb</a>;</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span>        }</div>
</div>
<div class="foldopen" id="foldopen00094" data-start="{" data-end="}">
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"><a class="line" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a042cc5d0a5c580ee1458dae4a4eed990">   94</a></span>            <a class="code hl_function" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a042cc5d0a5c580ee1458dae4a4eed990">stTimerItem</a>( <a class="code hl_struct" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html">stTimerItem</a>&amp;&amp; b ):</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span>          <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#aefcd9a0a370ca95c37da2bfa2414aa0a">m_id</a>( b.<a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#aefcd9a0a370ca95c37da2bfa2414aa0a">m_id</a>),</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span>                  <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a8f3bc796ececffd2605ada203e8c3d6a">m_abs_tick</a>( b.<a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a8f3bc796ececffd2605ada203e8c3d6a">m_abs_tick</a> ),</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span>                  <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a7e554f63565f3255151a689c8a715d7d">m_rel_tick</a>( b.<a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a7e554f63565f3255151a689c8a715d7d">m_rel_tick</a> ),</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span>                  <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#af3b6859b5f9a352e157cddee2f42bef9">m_one_shot</a>( b.<a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#af3b6859b5f9a352e157cddee2f42bef9">m_one_shot</a> )</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span>            {</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span>          <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a81e459956b6374fa2679bb7e19f063e5">pt_mgr__</a> = std::move( b.pt_mgr__ );</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span>          <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#aacd449d1db7359736073e5c39f29c7f8">m_cb</a> = std::move( b.m_cb );</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span>        }</div>
</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span> </div>
<div class="foldopen" id="foldopen00104" data-start="{" data-end="}">
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"><a class="line" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a0a67bac273df9c638ce0f3b32f96d217">  104</a></span>      <a class="code hl_struct" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html">stTimerItem</a>&amp; <a class="code hl_function" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a0a67bac273df9c638ce0f3b32f96d217">operator=</a>( <span class="keyword">const</span> <a class="code hl_struct" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html">stTimerItem</a>&amp; b ){</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span>        <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#aefcd9a0a370ca95c37da2bfa2414aa0a">m_id</a> = b.<a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#aefcd9a0a370ca95c37da2bfa2414aa0a">m_id</a>;</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span>        <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a8f3bc796ececffd2605ada203e8c3d6a">m_abs_tick</a> = b.<a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a8f3bc796ececffd2605ada203e8c3d6a">m_abs_tick</a>;</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span>        <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a7e554f63565f3255151a689c8a715d7d">m_rel_tick</a> = b.<a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a7e554f63565f3255151a689c8a715d7d">m_rel_tick</a>;</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span>        <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#af3b6859b5f9a352e157cddee2f42bef9">m_one_shot</a> = b.<a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a7e554f63565f3255151a689c8a715d7d">m_rel_tick</a>;</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span>        <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a81e459956b6374fa2679bb7e19f063e5">pt_mgr__</a> = b.<a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a81e459956b6374fa2679bb7e19f063e5">pt_mgr__</a>;</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span>        <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#aacd449d1db7359736073e5c39f29c7f8">m_cb</a> = b.<a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#aacd449d1db7359736073e5c39f29c7f8">m_cb</a>;</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span>        <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span>      }</div>
</div>
<div class="foldopen" id="foldopen00113" data-start="{" data-end="}">
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"><a class="line" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#adf3fde0133e44ad0f5da08479d047a58">  113</a></span>      <a class="code hl_struct" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html">stTimerItem</a>&amp; <a class="code hl_function" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#adf3fde0133e44ad0f5da08479d047a58">operator=</a>( <a class="code hl_struct" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html">stTimerItem</a>&amp;&amp; b ){</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span>        <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#aefcd9a0a370ca95c37da2bfa2414aa0a">m_id</a> = b.<a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#aefcd9a0a370ca95c37da2bfa2414aa0a">m_id</a>;</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span>            <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a8f3bc796ececffd2605ada203e8c3d6a">m_abs_tick</a> = b.m_abs_tick;</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span>            <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a7e554f63565f3255151a689c8a715d7d">m_rel_tick</a> = b.m_rel_tick;</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span>            <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#af3b6859b5f9a352e157cddee2f42bef9">m_one_shot</a> = b.m_rel_tick;</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span>            <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a81e459956b6374fa2679bb7e19f063e5">pt_mgr__</a> = std::move( b.pt_mgr__ );</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span>            <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#aacd449d1db7359736073e5c39f29c7f8">m_cb</a> = std::move( b.m_cb );</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span>        <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno">  121</span>      }</div>
</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"><a class="line" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a460419ab57928b16fbfac4b940ff70f1">  125</a></span>            <span class="keywordtype">void</span> <a class="code hl_function" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a460419ab57928b16fbfac4b940ff70f1">operator()</a>( std::function&lt; <span class="keywordtype">void</span> () &gt; func ){ <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#aacd449d1db7359736073e5c39f29c7f8">m_cb</a> = func; }</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"><a class="line" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#ab738abf5c78afe6db2c7bfc9fbfbae3a">  126</a></span>        <span class="keywordtype">void</span> <a class="code hl_function" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#ab738abf5c78afe6db2c7bfc9fbfbae3a">on</a>( std::function&lt; <span class="keywordtype">void</span> () &gt; func ){ <a class="code hl_variable" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#aacd449d1db7359736073e5c39f29c7f8">m_cb</a> = func; }</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span>        <span class="keywordtype">void</span> <a class="code hl_function" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a9a1520d075154a47e45ec7624641674b">start</a>( <span class="keywordtype">bool</span> sw );</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno">  132</span>        </div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno">  133</span>    };</div>
</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno">  134</span> </div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"><a class="line" href="../../d4/ded/classwheels_1_1ordered_timer.html#aadbb5b64702bfb31959d3dae954206d1">  135</a></span>    <span class="keyword">friend</span> <span class="keyword">class </span><a class="code hl_struct" href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html">stTimerItem</a>;</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno">  136</span>    </div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"><a class="line" href="../../d4/ded/classwheels_1_1ordered_timer.html#a023ed999ecdf4c046408c2f7c2b77992">  137</a></span>    <span class="keyword">using </span><a class="code hl_typedef" href="../../d4/ded/classwheels_1_1ordered_timer.html#a023ed999ecdf4c046408c2f7c2b77992">data_t</a> = std::map&lt; uint64_t , std::list&lt; std::shared_ptr&lt; stTimerItem &gt; &gt; &gt; ;</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"><a class="line" href="../../d4/ded/classwheels_1_1ordered_timer.html#af1dddbaa67ec818898169d8a967ce6f8">  138</a></span>    <span class="keyword">using </span><a class="code hl_typedef" href="../../d4/ded/classwheels_1_1ordered_timer.html#af1dddbaa67ec818898169d8a967ce6f8">iterator</a> = data_t::iterator;</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno">  140</span>    std::shared_ptr&lt; CTimer &gt;    pt_timer__;        <span class="comment">// 真实的计时器</span></div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span>    std::atomic&lt; uint32_t &gt;      m_itval__;         <span class="comment">// 滴答分度，单位ms</span></div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno">  142</span>    std::atomic&lt; uint64_t &gt;      m_base_ticks__;    <span class="comment">// 基础滴答，从对象创建开始启动，按照滴答分度计数，每次加一</span></div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno">  143</span>    std::atomic&lt; uint32_t &gt;      m_base_id__;</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno">  144</span>    std::mutex                   m_mutex__;</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno">  145</span>    </div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno">  146</span>    <a class="code hl_typedef" href="../../d4/ded/classwheels_1_1ordered_timer.html#a023ed999ecdf4c046408c2f7c2b77992">data_t</a>                       m_data__;</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno">  151</span>    <span class="keywordtype">void</span> timer_processor__();</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span>    <span class="keywordtype">void</span> start_timer__( std::shared_ptr&lt;stTimerItem&gt; timer );</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno">  156</span>    <span class="keywordtype">void</span> stop_timer__( std::shared_ptr&lt;stTimerItem&gt; timer );</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno">  157</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno">  158</span>        <a class="code hl_function" href="../../d4/ded/classwheels_1_1ordered_timer.html#a23c0754b20201f13e35fd7f30c6c1c91">orderedTimer</a>( <span class="keywordtype">long</span> itval = 1);</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno">  159</span>    <a class="code hl_function" href="../../d4/ded/classwheels_1_1ordered_timer.html#ae5e8854e8ea63ca5700c3af9d4817437">~orderedTimer</a>();</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno">  165</span>    std::shared_ptr&lt; stTimerItem &gt;</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno">  166</span>    <a class="code hl_function" href="../../d4/ded/classwheels_1_1ordered_timer.html#a6459eebdbdad733d0721c1f8e5e68e52">createTimer</a>( uint64_t relTick , <span class="keywordtype">bool</span> oneShot );</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno">  170</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="../../d4/ded/classwheels_1_1ordered_timer.html#a819c4e4b1f59b2678fa090b84fb44ee5">start</a>( <span class="keywordtype">bool</span> sw );</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno">  171</span> </div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno">  172</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="../../d4/ded/classwheels_1_1ordered_timer.html#a70c87ab74e53bdd4ed8ce47c12cb13df">erase</a>( <a class="code hl_typedef" href="../../d4/ded/classwheels_1_1ordered_timer.html#af1dddbaa67ec818898169d8a967ce6f8">iterator</a> it );</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno">  173</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="../../d4/ded/classwheels_1_1ordered_timer.html#a70c87ab74e53bdd4ed8ce47c12cb13df">erase</a>( <a class="code hl_typedef" href="../../d4/ded/classwheels_1_1ordered_timer.html#af1dddbaa67ec818898169d8a967ce6f8">iterator</a> b , <a class="code hl_typedef" href="../../d4/ded/classwheels_1_1ordered_timer.html#af1dddbaa67ec818898169d8a967ce6f8">iterator</a> e );</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno">  174</span> </div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"><a class="line" href="../../d4/ded/classwheels_1_1ordered_timer.html#a3160dd250254ac3ad3c7a9b4b7cfad0f">  175</a></span>    <a class="code hl_typedef" href="../../d4/ded/classwheels_1_1ordered_timer.html#af1dddbaa67ec818898169d8a967ce6f8">iterator</a> <a class="code hl_function" href="../../d4/ded/classwheels_1_1ordered_timer.html#a3160dd250254ac3ad3c7a9b4b7cfad0f">begin</a>(){ <span class="keywordflow">return</span> m_data__.begin(); }</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"><a class="line" href="../../d4/ded/classwheels_1_1ordered_timer.html#a941b7602ac131fc28bbebcc4f7bf1dba">  176</a></span>    <a class="code hl_typedef" href="../../d4/ded/classwheels_1_1ordered_timer.html#af1dddbaa67ec818898169d8a967ce6f8">iterator</a> <a class="code hl_function" href="../../d4/ded/classwheels_1_1ordered_timer.html#a941b7602ac131fc28bbebcc4f7bf1dba">end</a>(){ <span class="keywordflow">return</span> m_data__.end(); }</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno">  177</span>};</div>
</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno">  178</span> </div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno">  179</span><span class="comment">// 实现一个单例模式的TIMER</span></div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno">  180</span><span class="preprocessor">#if !defined( SINGLETON_TIMER )</span></div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"><a class="line" href="../../df/d05/timer_8hpp.html#a921bc17b15618b7f08d6189af89073b7">  181</a></span><span class="preprocessor">    #define SINGLETON_TIMER  1</span></div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno">  182</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno">  183</span> </div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno">  184</span><span class="preprocessor">#if SINGLETON_TIMER</span></div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"><a class="line" href="../../df/d8d/namespacewheels.html#ae6733cf5f7553efb416f3c6e4bab73cf">  185</a></span>    <span class="keyword">using </span><a class="code hl_class" href="../../de/d44/classwheels_1_1dm_1_1singleton.html">singletonTimer</a> = <a class="code hl_class" href="../../de/d44/classwheels_1_1dm_1_1singleton.html">dm::singleton&lt; orderedTimer &gt;</a>;</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno">  186</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno">  187</span>}</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno">  188</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="aclasswheels_1_1_c_timer_html"><div class="ttname"><a href="../../db/d3e/classwheels_1_1_c_timer.html">wheels::CTimer</a></div><div class="ttdef"><b>定义</b> <a href="#l00026">timer.hpp:27</a></div></div>
<div class="ttc" id="aclasswheels_1_1_c_timer_html_a0e94a7484f06a6e38c29591182191510"><div class="ttname"><a href="../../db/d3e/classwheels_1_1_c_timer.html#a0e94a7484f06a6e38c29591182191510">wheels::CTimer::setTick</a></div><div class="ttdeci">void setTick(long tick)</div><div class="ttdef"><b>定义</b> <a href="#l00064">timer.hpp:64</a></div></div>
<div class="ttc" id="aclasswheels_1_1_c_timer_html_a128e8bdb25823a748453e1b2a817ec99"><div class="ttname"><a href="../../db/d3e/classwheels_1_1_c_timer.html#a128e8bdb25823a748453e1b2a817ec99">wheels::CTimer::Stop</a></div><div class="ttdeci">virtual emErrCode Stop() final</div><div class="ttdoc">停止计时器</div><div class="ttdef"><b>定义</b> <a href="../../dc/de5/timer_8cpp_source.html#l00061">timer.cpp:61</a></div></div>
<div class="ttc" id="aclasswheels_1_1_c_timer_html_a503a7fd2e5fdfcd321622f6c34f234e3"><div class="ttname"><a href="../../db/d3e/classwheels_1_1_c_timer.html#a503a7fd2e5fdfcd321622f6c34f234e3">wheels::CTimer::SetOwner</a></div><div class="ttdeci">virtual void SetOwner(std::function&lt; void()&gt; fun) final</div><div class="ttdoc">指定事件响应函数，</div><div class="ttdef"><b>定义</b> <a href="../../dc/de5/timer_8cpp_source.html#l00055">timer.cpp:55</a></div></div>
<div class="ttc" id="aclasswheels_1_1_c_timer_html_a5a4c68739dffae58b731c5e9fcb98b0b"><div class="ttname"><a href="../../db/d3e/classwheels_1_1_c_timer.html#a5a4c68739dffae58b731c5e9fcb98b0b">wheels::CTimer::Start</a></div><div class="ttdeci">virtual emErrCode Start(long ms=-1, bool oneShot=false) final</div><div class="ttdoc">启动或者重启计时器。</div><div class="ttdef"><b>定义</b> <a href="../../dc/de5/timer_8cpp_source.html#l00050">timer.cpp:50</a></div></div>
<div class="ttc" id="aclasswheels_1_1_c_timer_html_a93e4d770fd09f5e1b984768620cc52bf"><div class="ttname"><a href="../../db/d3e/classwheels_1_1_c_timer.html#a93e4d770fd09f5e1b984768620cc52bf">wheels::CTimer::CTimer</a></div><div class="ttdeci">CTimer()</div><div class="ttdef"><b>定义</b> <a href="../../dc/de5/timer_8cpp_source.html#l00019">timer.cpp:19</a></div></div>
<div class="ttc" id="aclasswheels_1_1_c_timer_html_a981c7a2959ddebff80bd6f8eb2312a4f"><div class="ttname"><a href="../../db/d3e/classwheels_1_1_c_timer.html#a981c7a2959ddebff80bd6f8eb2312a4f">wheels::CTimer::Reset</a></div><div class="ttdeci">virtual emErrCode Reset() final</div><div class="ttdoc">复位计时，让计时器从零开始计时</div><div class="ttdef"><b>定义</b> <a href="../../dc/de5/timer_8cpp_source.html#l00072">timer.cpp:72</a></div></div>
<div class="ttc" id="aclasswheels_1_1_c_timer_html_ac4981c5eaeeacca8b3a123d4069c8812"><div class="ttname"><a href="../../db/d3e/classwheels_1_1_c_timer.html#ac4981c5eaeeacca8b3a123d4069c8812">wheels::CTimer::CTimer</a></div><div class="ttdeci">CTimer(const CTimer &amp;b)</div><div class="ttdef"><b>定义</b> <a href="#l00038">timer.hpp:38</a></div></div>
<div class="ttc" id="aclasswheels_1_1_c_timer_html_ad766f6d3012844697d709021ab23bb1b"><div class="ttname"><a href="../../db/d3e/classwheels_1_1_c_timer.html#ad766f6d3012844697d709021ab23bb1b">wheels::CTimer::IsRuning</a></div><div class="ttdeci">virtual bool IsRuning() final</div><div class="ttdoc">判断计时器是否正在运行</div><div class="ttdef"><b>定义</b> <a href="../../dc/de5/timer_8cpp_source.html#l00066">timer.cpp:66</a></div></div>
<div class="ttc" id="aclasswheels_1_1_c_timer_html_afd3f6595928cd20f7faaece75f017733"><div class="ttname"><a href="../../db/d3e/classwheels_1_1_c_timer.html#afd3f6595928cd20f7faaece75f017733">wheels::CTimer::~CTimer</a></div><div class="ttdeci">~CTimer()</div><div class="ttdef"><b>定义</b> <a href="../../dc/de5/timer_8cpp_source.html#l00047">timer.cpp:47</a></div></div>
<div class="ttc" id="aclasswheels_1_1dm_1_1singleton_html"><div class="ttname"><a href="../../de/d44/classwheels_1_1dm_1_1singleton.html">wheels::dm::singleton</a></div><div class="ttdef"><b>定义</b> <a href="../../de/d6d/singleton_8hpp_source.html#l00019">singleton.hpp:20</a></div></div>
<div class="ttc" id="aclasswheels_1_1ordered_timer_html"><div class="ttname"><a href="../../d4/ded/classwheels_1_1ordered_timer.html">wheels::orderedTimer</a></div><div class="ttdef"><b>定义</b> <a href="#l00067">timer.hpp:68</a></div></div>
<div class="ttc" id="aclasswheels_1_1ordered_timer_html_a023ed999ecdf4c046408c2f7c2b77992"><div class="ttname"><a href="../../d4/ded/classwheels_1_1ordered_timer.html#a023ed999ecdf4c046408c2f7c2b77992">wheels::orderedTimer::data_t</a></div><div class="ttdeci">std::map&lt; uint64_t, std::list&lt; std::shared_ptr&lt; stTimerItem &gt; &gt; &gt; data_t</div><div class="ttdef"><b>定义</b> <a href="#l00137">timer.hpp:137</a></div></div>
<div class="ttc" id="aclasswheels_1_1ordered_timer_html_a23c0754b20201f13e35fd7f30c6c1c91"><div class="ttname"><a href="../../d4/ded/classwheels_1_1ordered_timer.html#a23c0754b20201f13e35fd7f30c6c1c91">wheels::orderedTimer::orderedTimer</a></div><div class="ttdeci">orderedTimer(long itval=1)</div><div class="ttdef"><b>定义</b> <a href="../../dc/de5/timer_8cpp_source.html#l00104">timer.cpp:104</a></div></div>
<div class="ttc" id="aclasswheels_1_1ordered_timer_html_a3160dd250254ac3ad3c7a9b4b7cfad0f"><div class="ttname"><a href="../../d4/ded/classwheels_1_1ordered_timer.html#a3160dd250254ac3ad3c7a9b4b7cfad0f">wheels::orderedTimer::begin</a></div><div class="ttdeci">iterator begin()</div><div class="ttdef"><b>定义</b> <a href="#l00175">timer.hpp:175</a></div></div>
<div class="ttc" id="aclasswheels_1_1ordered_timer_html_a6459eebdbdad733d0721c1f8e5e68e52"><div class="ttname"><a href="../../d4/ded/classwheels_1_1ordered_timer.html#a6459eebdbdad733d0721c1f8e5e68e52">wheels::orderedTimer::createTimer</a></div><div class="ttdeci">std::shared_ptr&lt; stTimerItem &gt; createTimer(uint64_t relTick, bool oneShot)</div><div class="ttdoc">创建一个计时器</div><div class="ttdef"><b>定义</b> <a href="../../dc/de5/timer_8cpp_source.html#l00175">timer.cpp:175</a></div></div>
<div class="ttc" id="aclasswheels_1_1ordered_timer_html_a70c87ab74e53bdd4ed8ce47c12cb13df"><div class="ttname"><a href="../../d4/ded/classwheels_1_1ordered_timer.html#a70c87ab74e53bdd4ed8ce47c12cb13df">wheels::orderedTimer::erase</a></div><div class="ttdeci">void erase(iterator it)</div><div class="ttdef"><b>定义</b> <a href="../../dc/de5/timer_8cpp_source.html#l00196">timer.cpp:196</a></div></div>
<div class="ttc" id="aclasswheels_1_1ordered_timer_html_a819c4e4b1f59b2678fa090b84fb44ee5"><div class="ttname"><a href="../../d4/ded/classwheels_1_1ordered_timer.html#a819c4e4b1f59b2678fa090b84fb44ee5">wheels::orderedTimer::start</a></div><div class="ttdeci">void start(bool sw)</div><div class="ttdoc">启动系统计时器。这个是实际计时器模块。</div><div class="ttdef"><b>定义</b> <a href="../../dc/de5/timer_8cpp_source.html#l00187">timer.cpp:187</a></div></div>
<div class="ttc" id="aclasswheels_1_1ordered_timer_html_a941b7602ac131fc28bbebcc4f7bf1dba"><div class="ttname"><a href="../../d4/ded/classwheels_1_1ordered_timer.html#a941b7602ac131fc28bbebcc4f7bf1dba">wheels::orderedTimer::end</a></div><div class="ttdeci">iterator end()</div><div class="ttdef"><b>定义</b> <a href="#l00176">timer.hpp:176</a></div></div>
<div class="ttc" id="aclasswheels_1_1ordered_timer_html_aadbb5b64702bfb31959d3dae954206d1"><div class="ttname"><a href="../../d4/ded/classwheels_1_1ordered_timer.html#aadbb5b64702bfb31959d3dae954206d1">wheels::orderedTimer::stTimerItem</a></div><div class="ttdeci">friend class stTimerItem</div><div class="ttdef"><b>定义</b> <a href="#l00135">timer.hpp:135</a></div></div>
<div class="ttc" id="aclasswheels_1_1ordered_timer_html_ae5e8854e8ea63ca5700c3af9d4817437"><div class="ttname"><a href="../../d4/ded/classwheels_1_1ordered_timer.html#ae5e8854e8ea63ca5700c3af9d4817437">wheels::orderedTimer::~orderedTimer</a></div><div class="ttdeci">~orderedTimer()</div><div class="ttdef"><b>定义</b> <a href="../../dc/de5/timer_8cpp_source.html#l00113">timer.cpp:113</a></div></div>
<div class="ttc" id="aclasswheels_1_1ordered_timer_html_af1dddbaa67ec818898169d8a967ce6f8"><div class="ttname"><a href="../../d4/ded/classwheels_1_1ordered_timer.html#af1dddbaa67ec818898169d8a967ce6f8">wheels::orderedTimer::iterator</a></div><div class="ttdeci">data_t::iterator iterator</div><div class="ttdef"><b>定义</b> <a href="#l00138">timer.hpp:138</a></div></div>
<div class="ttc" id="aitimer_8hpp_html"><div class="ttname"><a href="../../db/d24/itimer_8hpp.html">itimer.hpp</a></div></div>
<div class="ttc" id="anamespacestd_html"><div class="ttname"><a href="../../d8/dcc/namespacestd.html">std</a></div><div class="ttdef"><b>定义</b> <a href="../../d1/d92/mandarava_2event_8hpp_source.html#l00038">event.hpp:39</a></div></div>
<div class="ttc" id="anamespacewheels_html"><div class="ttname"><a href="../../df/d8d/namespacewheels.html">wheels</a></div><div class="ttdoc">堆栈信息读取和保存记录</div><div class="ttdef"><b>定义</b> <a href="../../d3/df7/ary__str_8hpp_source.html#l00006">ary_str.hpp:7</a></div></div>
<div class="ttc" id="asingleton_8hpp_html"><div class="ttname"><a href="../../de/d6d/singleton_8hpp.html">singleton.hpp</a></div></div>
<div class="ttc" id="astructi_timer_html"><div class="ttname"><a href="../../d2/d38/structi_timer.html">iTimer</a></div><div class="ttdoc">定时器定义接口</div><div class="ttdef"><b>定义</b> <a href="../../db/d24/itimer_8hpp_source.html#l00014">itimer.hpp:15</a></div></div>
<div class="ttc" id="astructi_timer_html_a31bdd3250ca6c5542d0ec156bd82c5ab"><div class="ttname"><a href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5ab">iTimer::emErrCode</a></div><div class="ttdeci">emErrCode</div><div class="ttdef"><b>定义</b> <a href="../../db/d24/itimer_8hpp_source.html#l00016">itimer.hpp:17</a></div></div>
<div class="ttc" id="astructwheels_1_1ordered_timer_1_1st_timer_item_html"><div class="ttname"><a href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html">wheels::orderedTimer::stTimerItem</a></div><div class="ttdoc">计时器定义</div><div class="ttdef"><b>定义</b> <a href="#l00073">timer.hpp:74</a></div></div>
<div class="ttc" id="astructwheels_1_1ordered_timer_1_1st_timer_item_html_a042cc5d0a5c580ee1458dae4a4eed990"><div class="ttname"><a href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a042cc5d0a5c580ee1458dae4a4eed990">wheels::orderedTimer::stTimerItem::stTimerItem</a></div><div class="ttdeci">stTimerItem(stTimerItem &amp;&amp;b)</div><div class="ttdef"><b>定义</b> <a href="#l00094">timer.hpp:94</a></div></div>
<div class="ttc" id="astructwheels_1_1ordered_timer_1_1st_timer_item_html_a0a67bac273df9c638ce0f3b32f96d217"><div class="ttname"><a href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a0a67bac273df9c638ce0f3b32f96d217">wheels::orderedTimer::stTimerItem::operator=</a></div><div class="ttdeci">stTimerItem &amp; operator=(const stTimerItem &amp;b)</div><div class="ttdef"><b>定义</b> <a href="#l00104">timer.hpp:104</a></div></div>
<div class="ttc" id="astructwheels_1_1ordered_timer_1_1st_timer_item_html_a460419ab57928b16fbfac4b940ff70f1"><div class="ttname"><a href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a460419ab57928b16fbfac4b940ff70f1">wheels::orderedTimer::stTimerItem::operator()</a></div><div class="ttdeci">void operator()(std::function&lt; void() &gt; func)</div><div class="ttdoc">添加回调函数操作</div><div class="ttdef"><b>定义</b> <a href="#l00125">timer.hpp:125</a></div></div>
<div class="ttc" id="astructwheels_1_1ordered_timer_1_1st_timer_item_html_a599c4f1b59861d7645b208c5da3cbbd5"><div class="ttname"><a href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a599c4f1b59861d7645b208c5da3cbbd5">wheels::orderedTimer::stTimerItem::stTimerItem</a></div><div class="ttdeci">stTimerItem(const stTimerItem &amp;b)</div><div class="ttdef"><b>定义</b> <a href="#l00085">timer.hpp:85</a></div></div>
<div class="ttc" id="astructwheels_1_1ordered_timer_1_1st_timer_item_html_a7e554f63565f3255151a689c8a715d7d"><div class="ttname"><a href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a7e554f63565f3255151a689c8a715d7d">wheels::orderedTimer::stTimerItem::m_rel_tick</a></div><div class="ttdeci">uint64_t m_rel_tick</div><div class="ttdef"><b>定义</b> <a href="#l00077">timer.hpp:77</a></div></div>
<div class="ttc" id="astructwheels_1_1ordered_timer_1_1st_timer_item_html_a81e459956b6374fa2679bb7e19f063e5"><div class="ttname"><a href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a81e459956b6374fa2679bb7e19f063e5">wheels::orderedTimer::stTimerItem::pt_mgr__</a></div><div class="ttdeci">std::shared_ptr&lt; orderedTimer &gt; pt_mgr__</div><div class="ttdef"><b>定义</b> <a href="#l00080">timer.hpp:80</a></div></div>
<div class="ttc" id="astructwheels_1_1ordered_timer_1_1st_timer_item_html_a8f3bc796ececffd2605ada203e8c3d6a"><div class="ttname"><a href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a8f3bc796ececffd2605ada203e8c3d6a">wheels::orderedTimer::stTimerItem::m_abs_tick</a></div><div class="ttdeci">uint64_t m_abs_tick</div><div class="ttdef"><b>定义</b> <a href="#l00076">timer.hpp:76</a></div></div>
<div class="ttc" id="astructwheels_1_1ordered_timer_1_1st_timer_item_html_a9a1520d075154a47e45ec7624641674b"><div class="ttname"><a href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#a9a1520d075154a47e45ec7624641674b">wheels::orderedTimer::stTimerItem::start</a></div><div class="ttdeci">void start(bool sw)</div><div class="ttdoc">启动计时器或者关闭计时器</div><div class="ttdef"><b>定义</b> <a href="../../dc/de5/timer_8cpp_source.html#l00092">timer.cpp:93</a></div></div>
<div class="ttc" id="astructwheels_1_1ordered_timer_1_1st_timer_item_html_aacd449d1db7359736073e5c39f29c7f8"><div class="ttname"><a href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#aacd449d1db7359736073e5c39f29c7f8">wheels::orderedTimer::stTimerItem::m_cb</a></div><div class="ttdeci">std::function&lt; void() &gt; m_cb</div><div class="ttdef"><b>定义</b> <a href="#l00081">timer.hpp:81</a></div></div>
<div class="ttc" id="astructwheels_1_1ordered_timer_1_1st_timer_item_html_ab738abf5c78afe6db2c7bfc9fbfbae3a"><div class="ttname"><a href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#ab738abf5c78afe6db2c7bfc9fbfbae3a">wheels::orderedTimer::stTimerItem::on</a></div><div class="ttdeci">void on(std::function&lt; void() &gt; func)</div><div class="ttdef"><b>定义</b> <a href="#l00126">timer.hpp:126</a></div></div>
<div class="ttc" id="astructwheels_1_1ordered_timer_1_1st_timer_item_html_adf3fde0133e44ad0f5da08479d047a58"><div class="ttname"><a href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#adf3fde0133e44ad0f5da08479d047a58">wheels::orderedTimer::stTimerItem::operator=</a></div><div class="ttdeci">stTimerItem &amp; operator=(stTimerItem &amp;&amp;b)</div><div class="ttdef"><b>定义</b> <a href="#l00113">timer.hpp:113</a></div></div>
<div class="ttc" id="astructwheels_1_1ordered_timer_1_1st_timer_item_html_aefcd9a0a370ca95c37da2bfa2414aa0a"><div class="ttname"><a href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#aefcd9a0a370ca95c37da2bfa2414aa0a">wheels::orderedTimer::stTimerItem::m_id</a></div><div class="ttdeci">uint32_t m_id</div><div class="ttdef"><b>定义</b> <a href="#l00075">timer.hpp:75</a></div></div>
<div class="ttc" id="astructwheels_1_1ordered_timer_1_1st_timer_item_html_af3b6859b5f9a352e157cddee2f42bef9"><div class="ttname"><a href="../../df/dca/structwheels_1_1ordered_timer_1_1st_timer_item.html#af3b6859b5f9a352e157cddee2f42bef9">wheels::orderedTimer::stTimerItem::m_one_shot</a></div><div class="ttdeci">bool m_one_shot</div><div class="ttdef"><b>定义</b> <a href="#l00078">timer.hpp:78</a></div></div>
<div class="ttc" id="atimer__old_8hpp_html"><div class="ttname"><a href="../../d0/de3/timer__old_8hpp.html">timer_old.hpp</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
